package com.wedo.mall.activity.main;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.e.library.activity.EActivity;
import com.wedo.mall.R;
import com.wedo.mall.entity.Banner;

import butterknife.BindView;

/**
 * Created by lxy on 2017/6/19.
 */

public class BannerActivity extends EActivity{

    @BindView(R.id.iv_banner) ImageView iv_banner;
    @BindView(R.id.tv_banner) TextView tv_banner;

    @Override
    protected int layout() {
        return R.layout.activity_banner;
    }

    @Override
    protected void onActivityCreated(Bundle state) {
        Banner banner = getIntent().getParcelableExtra("banner");
        tv_banner.setText(banner.txt);
        Glide.with(this).load(banner.img).diskCacheStrategy(DiskCacheStrategy.ALL).into(iv_banner);
    }
}
